package com.ruoyi.web.convert.terminals;

import com.ruoyi.basedata.domain.TerminalsDb;
import com.ruoyi.web.entity.Terminals;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 系统报错 Convert
 *
 * @author 芋道源码
 */
@Mapper
public interface TerminalsConvert {

    TerminalsConvert INSTANCE = Mappers.getMapper(TerminalsConvert.class);
    @Mapping(source = "terminalId", target = "TerminalFactoryID")
    @Mapping(source = "installDate", target = "TerminalInstallDate")
    @Mapping(source = "installAddress", target = "TerminalInstallAddr")
    @Mapping(source = "communicateAddress", target = "TerminalAddress")
    @Mapping(source = "lng", target = "Lng")
    @Mapping(source = "lat", target = "Lat")
    Terminals convert(TerminalsDb bean);

    @Mapping(source = "fquipmentId", target = "equipmentId")
    List<Terminals> convert(List<TerminalsDb> bean);

}
